package com.pug.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author 飞哥
 * @Title: 学相伴出品
 * @Description: 飞哥B站地址：https://space.bilibili.com/490711252
 * 记得关注和三连哦！
 * @Description: 我们有一个学习网站：https://www.kuangstudy.com
 * @date 2022/4/12$ 21:35$
 */
@Controller
@Slf4j
public class ConsummerController {

    @Autowired
    private StringRedisTemplate stringRedisTemplate;


    @GetMapping("/")
    public String index() {
        return "index";
    }

    @GetMapping("/getordernum")
    @ResponseBody
    public String orderNumber() {
        return stringRedisTemplate.opsForValue().get("ordernum");
    }
}
